<?php
require_once("common/common_util.php");
function listFile($dir)
{
	$fileArray = array();
	$cFileNameArray = array();
	if($handle = opendir($dir))
	{
		while(($file = readdir($handle)) !== false)
		{
			if($file !="." && $file !="..")
			{
				$ab_file = $dir."\\".$file;
				if(is_file($ab_file) && (StringUtils::is_end_with($ab_file, ".h") || StringUtils::is_end_with($ab_file, ".cc")))
					$fileArray[] = $file;
			}
		}
	}
	return $fileArray;
}

$list = listFile('C:\william\mmsccode\mmsccode\mmsccode\kernel\lib\ydmlib');
foreach ($list as $item)
	echo $item.'<p>';
?>